<?php
/**
 * Autor:   Miguel A. Zilli
 * Email:   miguelzilli@gmail.com
 */

class Ivacondicion extends AppModel {
    var $name = 'Ivacondicion';
    var $useTable = 'ivacondiciones';
    var $primaryKey = 'id';
    var $displayField = 'desc_iva';
    var $recursive = 0;
    var $order=array(
        'Ivacondicion.desc_iva'=>'ASC'
    );

    var $validate = array(
        'desc_iva'  =>array(
            array('rule'=>'isUnique','message'=>'Error: Item existente.'),
            array('rule'=>'notEmpty','message'=>'Debe completar este dato.')
        )
    );

    var $hasMany = array(
        'Productor' => array(
            'className' => 'Productor',
            'foreignKey' => 'ivacondicion_id',
            'dependent' => false
        )
    );
}
?>